package models

import "go.didapinche.com/time"

type SubscribeType = int

const (
	Sms   SubscribeType = 0 //电话
	Phone SubscribeType = 1 //短信
)

const DingDingTableName = "t_ding_ding"

type DingDing struct {
	//表字段
	ID         uint64    `gorm:"primary_key,column:id" json:"id,omitempty" form:"id"`
	Name       string    `gorm:"column:name" json:"name,omitempty" form:"name"`
	Token      string    `gorm:"column:token" json:"token,omitempty" form:"token"`
	CreateTime time.Time `gorm:"column:create_time" json:"create_time,omitempty" form:"create_time"`
	Level      uint64    `gorm:"column:level" json:"level,omitempty" form:"level"`
	Msg        string    `gorm:"column:msg" json:"msg,omitempty" form:"msg"`
	GroupID    string    `gorm:"column:group_id" json:"group_id,omitempty" form:"group_id"`
	GroupName  string    `gorm:"column:group_name" json:"group_name,omitempty" form:"group_name"`
	Type       int       `gorm:"column:type" json:"type" form:"type"` //类型默认0拥有全部，1只有名字和token
	//传输参数
	PageNum  int `gorm:"-" json:"page_num" form:"page_num"`
	PageSize int `gorm:"-" json:"page_size" form:"page_size"`
}

func (DingDing) TableName() string {
	return DingDingTableName
}
